package com.xunwulian.cmpp.pdu;

import org.codehaus.jackson.annotate.JsonIgnore;

public abstract class Response extends CmppPDU {
    /**
     * The original request which this response relates to.
     *
     */
//    private Request originalRequest = null;

    /** Create a request PDU with default parameters. */
//    public Response() {
//    }

    /**
     * Create response PDU with given command id. Derived classes usually uses <code>super(THE_COMMAND_ID)</code> where
     * the <code>THE_COMMAND_ID</code> is the command id of the PDU the derived class represents.
     */
    public Response(int commandId) {
        super(commandId);
    }

    /**
     * Returns false as there can be no response to a response.
     *
     * @return
     */
    public boolean canResponse() {
        return false;
    }

    /**
     * Returns false.
     */
    @JsonIgnore
    public boolean isRequest() {
        return false;
    }

    /**
     * Returns true.
     */
    @JsonIgnore
    public boolean isResponse() {
        return true;
    }

    /**
     * Sets the original <code>Request</code> which this <code>Response</code> was created from.
     *
     */
//    public void setOriginalRequest(Request originalRequest) {
//        this.originalRequest = originalRequest;
//    }

    /**
     * Returns the original <code>Request</code> which this <code>Response</code> was created from.
     *
     */
//    public Request getOriginalRequest() {
//        return originalRequest;
//    }

    /*
     * public String getSmsPocessorId() { return null; }
     */

}
